1. Field of the Invention
The present invention relates to a method of filtering data. More particularly, in its preferred embodiment, the present invention relates to a lossy filtering operation for image data to be used in conjunction with or as a preprocess to other compression techniques.
2. Prior Art
The benefits of compressing data are well-known. Compressing data in some instances saves storage space while in other instances it reduces data transmission time. Numerous techniques are known in the prior art for compressing and decompressing digital video data. For example, see U.S. Pat. No. 5,046,119 entitled "Method and Apparatus For Compressing and Decompressing Color Video Data With An Anti-Aliasing Mode" assigned to the assignee of the present invention. U.S. Pat. No. 5,046,119 describes a digital compression technique that is termed lossy. Lossy data compression techniques concede a certain amount of lost accuracy of the image being represented in exchange for increased compression of the data. Lossy compression techniques have proven to be effective when applied to graphical or video images and digitized audio data. Such lossy techniques operate on the premise that a certain amount of loss of accuracy is acceptable to efficiently represent an image or audio, i.e. analog, source in a digital format. Other lossy compression techniques for video image data are discussed by Nelson in The Data Compression Book, M&T Books, a division of M&T Publishing, Inc., pp. 347-408, (1992).
Other known data compression techniques exactly replicate the original source data on decompression. Such data compression techniques are termed lossless. For example, see U.S. Pat. No. 4,558,302 entitled "High Speed Data Compression And Decompression Apparatus And Method". In a lossless data compression method, none of the data is lost during compression. Lossless data compression techniques, are typically used for storing or transmitting textual data. Besides U.S. Pat. No. 4,558,302, known lossless compression techniques include Huffman coding and various derivative works on the well-known Lempel-Ziv compression algorithms.
One such compression technique is known as frame differencing. In this technique, a reference frame is encoded by storing pixel data for each pixel location in a frame. The pixel data may be, for example, in a black and white display, a single bit indicating whether the pixel is on or off. In a display having various shades of grey, the data may comprise several bits and indicate the grey scale number. In a color display, the data for each pixel indicates the intensity for each of the three components red, green, and blue (RGB). The pixel data may indicate the state or intensity level of each pixel location directly, or it may be an index number which refers to a stored table of, for example, RGB color levels associated with each index number.
To compress the data by frame differencing, the pixel data in a reference frame is encoded. The next frame (a "frame differenced" frame) is encoded by recording the pixel data only for those pixel locations which have changed pixel data from the reference frame. Since from frame to frame there is usually a large number of pixels that do not change, this frame differencing technique greatly reduces the amount of data which must be stored and/or transmitted for a sequence of frames. Frame differencing techniques usually require that a pixel data for a pixel location change beyond a certain threshold in order for the pixel data to be considered changed from one frame to the next. Therefore, frame differencing is a lossy compression technique. In addition, the reference frame itself can be encoded using one or more lossy or lossless techniques.
What is needed is a technique for reducing the number of changed pixels which must be stored without significantly reducing the perceptual quality of the stored or transmitted image.